﻿<Window x:Class="Mobwiz.SpellChecker.DictMaker.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Dictionary Maker" Height="232" Width="573">
    <Grid>       
        <Grid.RowDefinitions>
            <RowDefinition Height="36" />
            <RowDefinition Height="36" />
            <RowDefinition Height="36" />
            <RowDefinition Height="36" />
            <RowDefinition Height="36" />
            <RowDefinition Height="36" />
        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style TargetType="RadioButton">
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="Margin" Value="5,0" />
            </Style>
            <Style TargetType="Label">
                <Setter Property="HorizontalContentAlignment" Value="Left" />
                <Setter Property="VerticalContentAlignment" Value="Center" />
                <Setter Property="Width" Value="120" />
                <Setter Property="Margin" Value="5,0" />
            </Style>
            <Style TargetType="TextBox">
                <Setter Property="Width" Value="320" />
                <Setter Property="Margin" Value="5" />
            </Style>
            <Style TargetType="Button">                
                <Setter Property="Margin" Value="5" />
                <Setter Property="Padding" Value="8,0" />
            </Style>
        </Grid.Resources>
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <Label>Phonet type:</Label>
            <RadioButton Content="Aspell" IsChecked="{Binding IsAspellPhonet}" Unchecked="RadioButton_Unchecked" Checked="RadioButton_Checked" />
            <RadioButton Content="Generic" />
        </StackPanel>
        <StackPanel Grid.Row="1" Orientation="Horizontal" x:Name="spPhonetRuleFile" >
            <Label>Phonet file path:</Label>
            <TextBox Text="{Binding Path=PhonetFilePath}" x:Name="txtPhoentFilePath" />
            <Button Content="..." Command="{Binding SelectPhonetCommand}" x:Name="btnSelectPhonet"/>
        </StackPanel>
        <StackPanel Grid.Row="2" Orientation="Horizontal" >
            <Label>Word list file path:</Label>
            <TextBox Text="{Binding Path=WordListFilePath}" />
            <Button Content="..." Command="{Binding SelectWordListCommand}" />
        </StackPanel>

        <StackPanel Grid.Row="3" Orientation="Horizontal" >
            <Label>Output file path:</Label>
            <TextBox Text="{Binding Path=OutputFilePath}" />
            <Button Content="..." Command="{Binding SelectOutputCommand}" />
        </StackPanel>

        <StackPanel Grid.Row="4" Orientation="Horizontal">
            <Label> </Label>
            <Button Content="Start" Command="{Binding StartConvertCommand}" />
            <ProgressBar Width="308" Height="28" Maximum="100" Value="{Binding ConvertProgress}" />
        </StackPanel>     
    </Grid>
</Window>
